import Vue from 'vue';
import Vuex from 'vuex';
import createPersistedState from 'vuex-persistedstate'
import tabbar from './tabbar';
import getters from './getters';
import actions from './actions';
import car from './car';
Vue.use(Vuex);

export default new Vuex.Store({
  modules: {
    tabbar,
    car,
  },
  getters,
  actions,
  plugins: [
    createPersistedState({
      storage: window.sessionStorage,
      // reducer(val) {
      //   return {
      //     car: val.car,
      //     tabbar: val.tabbar
      //   }
      // }
    })
  ]
});
